package com.xinfu.newproject.adapter.visitor_adapter;

import android.text.TextPaint;
import android.text.style.ClickableSpan;
import android.view.View;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.xinfu.newproject.R;
import com.xinfu.newproject.bean.matter_repair.MatterListDataBean;

/**
 *
 */
public class VisitorListAdapter extends BaseQuickAdapter<MatterListDataBean, BaseViewHolder> {

    TextView nameTv, timeTv, priceTv, carId;

    public VisitorListAdapter() {
        super(R.layout.item_visitor_list, null);
    }

    @Override
    protected void convert(BaseViewHolder helper, MatterListDataBean item) {
        helper.setText(R.id.item_visitor_list_status_tv, item.getStatus());
        helper.setText(R.id.item_visitor_list_time_tv, item.getTime());
        helper.setText(R.id.item_visitor_list_type_name_tv, item.getTypeName());

        helper.itemView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
//                SwichFragmentInterface swichFragmentInterface = (SwichFragmentInterface)mContext;
//                swichFragmentInterface.setSelectedFragment(FRAGMENT_TWO,0);
            }
        });
    }

    ClickableSpan clickableSpan = new ClickableSpan() {
        @Override
        public void onClick(View widget) {
//            ToastUtils.showShortToast("事件触发了 landscapes and nedes");
        }

        @Override
        public void updateDrawState(TextPaint ds) {
//            ds.setColor(Utils.getContext().getResources().getColor(R.color.clickspan_color));
//            ds.setUnderlineText(true);
        }
    };


}
